Skip to content

Test#53

Merged
JulianKimmig merged 2 commits into
mainfrom
test
Sep 4, 2025
Merged

Test#53
JulianKimmig merged 2 commits into
mainfrom
test

Conversation

@JulianKimmig

Copy link
Copy Markdown
Member

No description provided.

… selected source

- Implemented logic to adjust peak indices using either the original signal or centroid method.
- Enhanced peak detection accuracy by allowing for dynamic peak repositioning within specified bounds.
feat(peak_finder): add optional re-centering of peak indices based on…
@JulianKimmig
JulianKimmig requested a review from Copilot September 4, 2025 12:47
@JulianKimmig
JulianKimmig merged commit 568a70a into main Sep 4, 2025
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the package version from 1.0.0 to 1.0.1 and adds peak re-centering functionality to the peak analysis module, allowing peaks to be adjusted based on either the original signal or centroid calculation.

  • Adds optional peak re-centering logic with support for "original" and "centroid" index sources
  • Updates package version to 1.0.1 in both __init__.py and pyproject.toml

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/funcnodes_span/peak_analysis.py Adds peak re-centering functionality using argmax or centroid methods
src/funcnodes_span/init.py Updates version number to 1.0.1
pyproject.toml Updates version number to 1.0.1

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

f = min(len(_y) - 1, int(f_idx))
if f <= i:
continue
if index_source == "original" and on is not None:

Copilot AI Sep 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition checks on is not None but the variable on is not defined in the visible scope. This will raise a NameError when index_source == "original".

Suggested change
if index_source == "original" and on is not None:
if index_source == "original":

Copilot uses AI. Check for mistakes.
continue
if index_source == "original" and on is not None:
# Use argmax on the original (or differently processed) signal within bounds
local_argmax = int(np.argmax(_y[i : f + 1])) + i

Copilot AI Sep 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using _y for argmax calculation when the comment mentions 'original signal', but _y appears to be the processed signal. The variable name and logic don't match the intended behavior described in the comment.

Suggested change
local_argmax = int(np.argmax(_y[i : f + 1])) + i
local_argmax = int(np.argmax(on[i : f + 1])) + i

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants